@layout("/template/container.html",{plugins:["ztree"],js:["/js/module/admin/sysUser/index.js"]}){

<div class="layui-body-header">
    <span class="layui-body-header-title">用户管理</span>
</div>

<div class="layui-fluid">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-sm12 layui-col-md12 layui-col-lg12">
            <div class="layui-card">
                <div class="layui-card-body">
                    <div class="layui-form toolbar">
                        <div class="layui-form-item">
                            @if(ShiroUtil.hasPermission("/admin/crm/toSelector")){
                                <input type="hidden" value="true" id="crm-selector">
                                <div class="layui-inline">
                                    <input type="text" class="layui-input" autocomplete="off" placeholder="后台" id="crmName">
                                </div>
                            @}else{
                                <input type="hidden" value="false" id="crm-selector">
                            @}
                            <div class="layui-inline">
                                <input type="text" class="layui-input" autocomplete="off" placeholder="用户名称" id="name">
                            </div>
                            <div class="layui-inline">
                                <input type="text" class="layui-input" autocomplete="off" placeholder="账户" id="username">
                            </div>
                            <div class="layui-inline">
                                <button id="btnSearch" class="layui-btn icon-btn"><i class="layui-icon layui-icon-search"></i>搜索</button>
                            </div>
                            @if(ShiroUtil.hasPermission("/admin/user/add")){
                                <div class="layui-inline">
                                    <button id="btnAdd" class="layui-btn icon-btn"><i class="layui-icon">&#xe654;</i>添加</button>
                                </div>
                            @}
                        </div>
                    </div>
                    <table class="layui-table" id="table" lay-filter="table"></table>
                </div>
            </div>
        </div>
    </div>
</div>

<script type="text/html" id="tableBar">
    @if(ShiroUtil.hasPermission("/admin/userMenuRoleRelation/setAuthority/{userUuid}")){
        <a class="layui-btn layui-btn-xs" lay-event="menu_assign">菜单权限</a>
    @}
    @if(ShiroUtil.hasPermission("/admin/userFunctionRoleRelation/setAuthority/{userUuid}")){
        <a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="function_assign">功能权限</a>
    @}

    @if(ShiroUtil.hasPermission("/admin/user/delete/{uuid}")){
        <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="delete">删除</a>
    @}
    @if(ShiroUtil.hasPermission("/admin/dataModifyLock/add")){
        <a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="data_lock">数据锁</a>
    @}
</script>

<script type="text/html" id="statusTpl">
    <select data-id="{{d.id}}" data-uuid="{{d.uuid}}" lay-filter="statusFilter" data-value="{{d.status}}">
        <option value='0' >正常</option>
        <option value='1'>异常</option>
        <option value='2'>冻结</option>
    </select>
</script>
@}